From ddefb172f66bcd646dd0b75a7ea8360157dd2ba0 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Thu, 21 Jul 2022 10:45:59 -0700 Subject: Replace/Rename Astro.canonicalURL with new Astro.url helper (#3959) * add Astro.url * Add examples of how to create the canonicalURL Co-authored-by: Matthew Phillips --- examples/blog-multiple-authors/src/pages/posts/[...page].astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/blog-multiple-authors/src/pages/posts/[...page].astro') diff --git a/examples/blog-multiple-authors/src/pages/posts/[...page].astro b/examples/blog-multiple-authors/src/pages/posts/[...page].astro index 8a6c9a730..3c6488855 100644 --- a/examples/blog-multiple-authors/src/pages/posts/[...page].astro +++ b/examples/blog-multiple-authors/src/pages/posts/[...page].astro @@ -32,7 +32,7 @@ export async function getStaticPaths({ paginate, rss }) { // page const title = "Don’s Blog"; const description = "An example blog on Astro"; -const { canonicalURL } = Astro; +const canonicalURL = new URL(Astro.url.pathname, Astro.site); const { page } = Astro.props; --- -- cgit v1.2.3